[][src]Crate amethyst_derive

This crate implements various derive macros for easing the use of various amethyst features. At the moment, this consists of event readers, prefab and UI widget derives.

Derive Macros

EventReader

EventReader

PrefabData

Deriving a Prefab requires that amethyst::ecs::Entity, amethyst:assets::{PrefabData, ProgressCounter} and amethyst::error::Error are imported and visible in the current scope. This is due to how Rust macros work.

SystemDesc

Derive a SystemDesc implementation.

WidgetId

This allows the use of an enum as an ID for the Widgets resource. One variant has to be marked as the default variant with #[widget_id_default] and will be used when a Widgetis added to the resource without an explicit ID. Note that when usingWidgets::add`, this will overwrite an existing widget with the same default id!